package com.woniuxy.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhouzhou
 * @since 2022-06-23
 */
@Data
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class VoteTopic implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "topic_id", type = IdType.AUTO)
    private Integer topicId;

    private String topicTitle;

    private Integer topicState;

    private LocalDateTime topicStartDate;

    private LocalDateTime topicEndDate;

    @Override
    public String toString() {
        return "{" +
                "topicId:" + topicId +
                ", topicTitle:'" + topicTitle + '\'' +
                ", topicState:" + topicState +
                ", topicStartDate:" + topicStartDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) +
                ", topicEndDate:" + topicEndDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) +
                '}';
    }
}
